﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="lienhe.ascx.cs" Inherits="Clients_Control_lienhe" %>
<%--<%@ OutputCache Duration="600" VaryByParam="None" %>--%>
<div id="content">
        <div class="content_title"><span>
            <asp:Literal ID="lblContentTitle" runat="server"></asp:Literal></span></div>
     <div class="content_title_bg"></div>
     <div></div>
     <div></div>
     <span id="ResultsSpan" runat="server"></span>
     <asp:Literal ID="lblFooter" runat="server" Visible="false"></asp:Literal>
        <div id="nd_lien_he">
            <!--Viet css-->
          <%--  <h3><p>CÔNG TY PHẦN MỀM DAMI</p></h3>
            <p><b>Chuyên về phần mềm Quản Trị Doanh Nghiệp</b></p>
            <p><b>Địa chỉ:24/3B Cây Trâm, P.8, Q.Gò Vấp, TP.Hồ Chí Minh</b></p>
            <p><b>Tel:    (08) 3947 0247 - 3987 1787   Fax: (08) 6257 9215</b></p>
            <p><b>Email:  info@damivn.com    dami1080@gmail.com</b></p>
            <p><b>Website:  www.damivn.com   www.simsoft.com.vn</b></p>--%>
            <asp:Literal ID="lblLienhe" runat="server"></asp:Literal>
        </div>

        <div id="map">
            <iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" 
            src="http://maps.google.com/maps?f=d&amp;source=s_d&amp;saddr=&amp;daddr=24%2F3b+C%C3%A2y+Tr%C3%A2m,+ph%C6%B0%E1%BB%9Dng+11,+Go+Vap+District,+Ho+Chi+Minh+City,+Vietnam&amp;hl=en&amp;geocode=FVFypQAdhGdbBimLzHN6oil1MTFk14-AmgX0nA&amp;mra=ls&amp;sll=10.842157,106.653557&amp;sspn=0.035026,0.038581&amp;ie=UTF8&amp;ll=10.842157,106.653557&amp;spn=0.040463,0.054932&amp;z=14&amp;output=embed"></iframe><br />
            <small><a href="http://maps.google.com/maps?f=d&amp;source=embed&amp;saddr=&amp;daddr=24%2F3b+C%C3%A2y+Tr%C3%A2m,+ph%C6%B0%E1%BB%9Dng+11,+Go+Vap+District,+Ho+Chi+Minh+City,+Vietnam&amp;hl=en&amp;geocode=FVFypQAdhGdbBimLzHN6oil1MTFk14-AmgX0nA&amp;mra=ls&amp;sll=10.842157,106.653557&amp;sspn=0.035026,0.038581&amp;ie=UTF8&amp;ll=10.842157,106.653557&amp;spn=0.040463,0.054932&amp;z=14"
             style="color:#0000FF;text-align:left">View Larger Map</a></small>

        </div>
    
      <div id="detail_new_content"> 
              <div class="form-item">
                <label id="lblSend" for="salutation">Người gửi:</label> 
                <div class="field">
                <input type="text"  class="input" maxlength="100" size="45" id="txtName" name="txtName"/><span>(*)</span>
                <div class="error" id="errtxtName" style="display:none;">Vui lòng nhập tên người gửi </div></div>
                </div><!--end form-item-->
                <div class="form-item">
                <label id="Label1" for="salutation">Email:</label> 
                <div class="field">
                <input type="text"  class="input" maxlength="100" size="35" id="txtEmail" name="txtEmail"/><span>(*)</span>
                <div class="error" id="errtxtEmail" style="display:none;"> Email không hợp lệ</div></div>
                </div><!--end form-item-->
                <div class="form-item">
                <label id="Label2" for="salutation">Điện thoại:</label> 
                <div class="field">
                <input type="text"  class="input" maxlength="15" size="35" id="txtPhone" name="txtPhone" onkeypress="return isNumberKey(event)"/>
                <div class="error" id="errtxtPhone" style="display:none;"> Chưa nhập số điện thoại</div>
                </div><!--field-->
                </div><!--end form-item-->
                <div class="form-item">
                <label id="Label3" for="salutation">Tiêu đề:</label> 
                <div class="field">
                    <input type="text"  class="input" maxlength="100" size="35" id="txtTieude" name="txtTieude"/>
                    <div class="error" id="errtxtTieude" style="display:none;">Vui lòng nhập tiêu đề </div>
                </div><!--End field-->
                
                </div><!--end form-item-->
                <div class="form-item">
                <label id="Label4" for="salutation">Nội dung:</label> 
                <div class="field">
                    
                    <textarea id="txtNoidung" cols="20" rows="8" name="txtNoidung" style="height: 250px"></textarea><span>(*)</span>
                
                <div class="error" id="errNoidung" style="display:none;">Chiều dài tối thiếu là 10 ký tự </div></div>
                </div><!--end form-item-->
                <div class="form-item">
                <label id="Label5" for="salutation">Mã xác nhận:</label> 
                <div class="field">
               <input type="text"  class="input" maxlength="100" size="40" id="txtCode" name="txtCode"  /><span>(*)</span>
               <div id="captcha"></div>
            <div class="error"> <img src="<%=Constant.ROOT_PATH %>JImage.aspx" ></div></div>
                </div><!--end form-item-->
                <div class="buttons">

                    <asp:Button ID="Button1" runat="server" Text="Gửi" onclick="Button1_Click"  Enabled="true" /><asp:Button
                        ID="btnClear" runat="server" Text="Nhập lại" />
</div><!--End Button-->

     </div>
    
  <div class="error">
        <asp:Label ID="lblCaptcha" runat="server" Text="Bạn nhập chưa đúng Mã xác nhận.Xin vui lòng nhập lại thông tin"></asp:Label> </div>
   
</div>
<script src="../../Scripts/input.js" type="text/javascript"></script>

<script type="text/javascript">
    var strControl = "";
    var errControl = "err";
    var arrField = new Array("txtName", "txtEmail");
    var arrErr = new Array("errtxtName", "errtxtEmail");

    function checkemail(email) {

        var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
        return emailPattern.test(email);
    }

    function isNumberKey(evt) {
        var charCode = (evt.which) ? evt.which : event.keyCode
        if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

        return true;
    }

    function ClearAll() {
        var l = arrField.length;
        for (var i = 0; i < l; i++) {
            var myVal = document.getElementById(arrField[i]);
            myVal.value = "";
        }
        var myNoidung = document.getElementById("txtNoidung");
        myNoidung.value = "";
        var myMaxacnhan = document.getElementById("txtCode");
        myMaxacnhan.value = "";
        var mydt = document.getElementById("txtPhone");
        mydt.value = "";
        var mytd = document.getElementById("txtTieude");
        mytd.value = "";
        HideAll();
        var fullName = document.getElementById(arrField[0]);
        fullName.focus();
        return false;
    }

    function HideAll() {
        var l = arrField.length;
        for (var i = 0; i < l; i++) {
            var myVal = document.getElementById(arrErr[i]);
            myVal.style.display = 'none';
        }
        var errNoidung = document.getElementById("errNoidung");
        errNoidung.style.display = 'none';

    }

    function OnSubmitClick() {
        HideAll();
        var errExisting = false;
        var bBoolFocus = false;
        var l = arrField.length;
        for (var i = 0; i < l; i++) {
            var obj = document.getElementById(arrField[i]);
            if (obj != null) {
                if (obj.value == "") {
                    errExisting = true;
                    var myVal = document.getElementById(arrErr[i]);
                    myVal.style.display = 'block';
                    
                }
                if (errExisting && !bBoolFocus) {
                    bBoolFocus = true;
                    obj.focus();
                }
            }

        }

        var myEmail = document.getElementById("txtEmail");
        if (!checkemail(myEmail.value)) {
            var myVal = document.getElementById(arrErr[1]);
            myVal.style.display = 'block';
            errExisting = true;
            if (!bBoolFocus) {
                myEmail.focus();
                bBoolFocus = true;
            }
        }

        var noidung = document.getElementById("txtNoidung");
        if (noidung.value.length < 10 || noidung.value == "") {
            var errNoidung = document.getElementById("errNoidung");
            errNoidung.style.display = 'block';
            errExisting = true;
            if (!bBoolFocus) {
                noidung.focus();
                bBoolFocus = true;
            }
        }
        return !errExisting;
    }

</script>